<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <style>
    
  </style>
</head>
<body>
  
</body>
<script>

  console.log( Boolean( "" ) );
  console.log( Boolean( "a" ) );
  console.log( Boolean( "false" ) );
  console.log( Boolean( " " ) );
  console.log( Boolean( "{}" ) );

  console.log( "----" );
  
  console.log( Boolean( 1 ) );
  console.log( Boolean( 3 ) );
  console.log( Boolean( 3.5 ) );
  console.log( Boolean( -3 ) );
  console.log( Boolean( -3.5 ) );
  console.log( Boolean( 0 ) );
  console.log( Boolean( NaN ) );
  
  console.log( "----" );
  
  console.log( Boolean( {} ) );
  console.log( Boolean( {name:"admin"} ) );
  console.log( Boolean( [] ) );
  console.log( Boolean( [0] ) );
  console.log( Boolean( [false] ) );
  console.log( Boolean( [ ] ) );
  console.log( Boolean( function(){} ) );
  
  console.log( "----" );

  console.log( Boolean( null ) );
  console.log( Boolean( undefined ) );


  // 非空字符为true，空字符为false
  // 非0和NaN为true，0和NaN为false
  // 复杂数据（花括号对象，中括号对象，函数）都为true
  // null和undefined都是false


  
</script>
</html>